﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace AnesSystem.ViewModels.Operation.CQ.RCQRMYY
{
    public class AnethOperInfoYiShiShouShuCtrlViewModel : BaseViewModel<AnethOperInfoYiShiShouShuCtrlViewModel>
    {
        #region Variables
        private string _ysssTexArea;
        List<string> sqzdList = new List<string>();

        #endregion

        #region Constructor
        public AnethOperInfoYiShiShouShuCtrlViewModel()
        {
            
        }

        #endregion

        #region Properties
        public string YsssTexArea
        {
            get
            {                               
                return _ysssTexArea;
            }
            set
            {
                _ysssTexArea = value;
                RaisePropertyChanged("YsssTexArea");
            }
        }

        #endregion

        #region 依赖属性

        #endregion

        #region Event

        #endregion

        #region Private Methods

        #endregion

        #region Public/Protected Methods
        public string[] InitialCheckBoxList()
        {
            string s = Regex.Replace(_ysssTexArea.Trim(), @"\d+\、", "*");
            string[] textlist = s.Split('*');
            return textlist;
        }
        #endregion

        #region EventHandlers
        public void Excute(string commond)
        {
            DataManager.Instance.IsNotNeedSaveData = false;
            switch (commond)
            {
                case "Save":
                    {
                        DataManager.Instance.CurrentPatientLink.AnesthesiaRecord.Ysss1 = YsssTexArea;
                        DrugAndEventWindow.Instance.CloseWin();
                    }
                    break;
                case "Cancel":
                    {
                        DrugAndEventWindow.Instance.CloseWin();
                    }
                    break;
            }
        }
        #endregion
    }
}
